#include <unistd.h>
#include <iostream>
#include <string>
#include <vector>
#include <fcntl.h>
#include <assert.h>
#include <ctime> 
#include <sys/types.h>
#include <sys/wait.h>

using namespace std;

// 一个无返回值,无参数的函数指针
typedef void (*task_t)();

void Task1()
{
    cout << "任务1..." << endl;
}
void Task2()
{
    cout << "任务2..." << endl;
}
void Task3()
{
    cout << "任务3..." << endl;
}
void Task4()
{
    cout << "任务4..." << endl;
}
void Task5()
{
    cout << "任务5..." << endl;
}
void Task6()
{
    cout << "任务6..." << endl;
}
void Task7()
{
    cout << "任务7..." << endl;
}
void Task8()
{
    cout << "任务8..." << endl;
}

// 将任务添加到tasks中
void LoadTasks(vector<task_t> * tasks)
{
    tasks->push_back(Task1);
    tasks->push_back(Task2);
    tasks->push_back(Task3);
    tasks->push_back(Task4);
    tasks->push_back(Task5);
    tasks->push_back(Task6);
    tasks->push_back(Task7);
    tasks->push_back(Task8);
}